package cn.congzhou.crm.mapper;

import cn.congzhou.crm.domain.School;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SchoolMapper {


    List<School> selectAll();

    /**
     * 根据id查询一条校区信息
     * @param id
     * @return
     */
    School selectByPrimaryKey(Long id);

    /**
     * 更新校区信息
     * @param school
     */
    void updateSchool(School school);

    /**
     * 插入一条校区信息
     * @param school
     */
    void insertSchool(School school);

    /**
     * 清除校区和部门的关系
     * @param schoolId
     */
    void deleteDepartmentRelation(Long schoolId);

    /**
     * 添加校区和部门的关系
     * @param schoolId
     * @param deptId
     */
    void insertDepartmentRelation(@Param("schoolId")Long schoolId, @Param("deptId")Long deptId);
}
